/*
*    Phantom v2.0 GUI Automation Software
*    Copyright (C) 2009  John C. Van Arsdall (john@phantomtest.com)
*
*    This program is free software; you can redistribute it and/or modify
*    it under the terms of the GNU General Public License as published by
*    the Free Software Foundation; either version 2 of the License, or
*    (at your option) any later version.
*
*    This program is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*    GNU General Public License for more details.
*
*    You should have received a copy of the GNU General Public License along
*    with this program; if not, write to the Free Software Foundation, Inc.,
*    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
#pragma once
#include "SSI_ScriptAPI.h"
#include "Minion_InternalErrors.h"
#include "Minion_External.h"

#define MINION_MAX_TEXT 4096

#define PM_LEFT		0
#define PM_MID		1
#define PM_RIGHT	2
#define PM_CLICK	0
#define PM_DOWN		1
#define PM_UP		2
#define PM_DBLCLICK	3


class  CPhantomWindow
{
public:
	CPhantomWindow(void);
  CPhantomWindow(String& ClassName);
	virtual ~CPhantomWindow(void);
protected:
	String MyClass;
	String ExtraData;
public:
	HWND MyWin;
	virtual CPhantomWindow* MakeWindow(void);
	virtual int FunctionProcessor(SSI_FunctionAPI& theAPI);
	virtual int InitWindow(void);
	String GetClass(void);
	int MyType;
	CStatus GetText(String& RetText);
	CWnd* aWnd;
	virtual int Attach(HWND InWnd);
	virtual int Detach(void);
	int SetClass(String& NewClass);
	CStatus SetText(String& NewText);
	//CStatus MouseClick(int iButton, int X, int Y, int iType);
	//CStatus TypeKeys(String& inKeys);
	//CStatus TypeKeys2(String &InParams, UINT Type);
	//UINT GetKeyCode(String& Line);
	//CStatus TypeKeysEx(String& InParams);
	//int IsShifted(char c);
	CStatus MouseMove(int X, int Y);
	CStatus SetActive(void);
	void Blink(int iCount);
	void SetExtraData(String& in_ExtraData);
};
